package com.monicaca.dao.impl;

import com.monicaca.bean.INV_LOG;
import com.monicaca.dao.INV_LOGDAO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.support.DataAccessUtils;
import org.springframework.orm.hibernate4.HibernateTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class INV_LOGDAOImpl extends BaseDAOImpl implements INV_LOGDAO{
	@Autowired
	public void setHibernateTemplate(HibernateTemplate hibernateTemplate){
		super.hibernateTemplate = hibernateTemplate;
	}

	public INV_LOG findByName(INV_LOG inv_log) {
		return  hibernateTemplate.findByExample(inv_log).get(0);
	}
	public  int count4(){
		String sql = "select count(*) from INV_log";
		return DataAccessUtils.intResult(hibernateTemplate.find(sql));
	}

}
